package com.example.everying.model.job;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @program: everything
 * @description: 定时任务
 * @author: zw
 * @create: 2025-07-09 09:50
 **/
@Data
public class ScheduleJob {
    private String id;
    /**
     * 任务名称
     */
    private String jobName;
    /**
     * 任务id
     */
    private String jobId;
    /**
     * Cron表达式
     */
    private String cronExpression;
    /**
     * 任务状态（0-暂停，1-运行）
     */
    private Integer jobStatus;
    /**
     * 任务定时时间
     */
    private String description;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "逻辑删除(1:已删除，0:未删除)")
    @TableLogic//逻辑删除
    @TableField("is_delete")
    private int isDelete;
}
